<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="~{layout/commonRes::common('-数据字典管理', false, true)}"></head>
<body>
<div class="layui-card">
  <div class="layui-form layui-card-header layuiadmin-card-header-auto">
    <div class="layui-form-item">
      <div class="layui-inline">
        <label class="layui-form-label">字典值:</label>
        <div class="layui-input-block">
          <input type="text" name="dictValue" placeholder="请输入" autocomplete="off" class="layui-input">
        </div>
      </div>
      <div class="layui-inline">
        <label class="layui-form-label">字典名称:</label>
        <div class="layui-input-block">
          <input type="text" name="dictName" placeholder="请输入" autocomplete="off" class="layui-input">
        </div>
      </div>
      <div class="layui-inline">
        <label class="layui-form-label">上级字典:</label>
        <div class="layui-input-block layui-select-width">
          <select name="parentId" id="parentId">
            <option value="">--请选择--</option>
            <option th:each="enmu : ${parentList}" th:value="${enmu.value}" th:text="${enmu.name}"></option>
          </select>
        </div>
      </div>
      <div class="layui-inline">
        <button class="layui-btn layui-btn-primary layui-btn-sm" lay-submit lay-filter="searchDict">
          <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
        </button>
        <button type="button" class="layui-btn layui-btn-normal layui-btn-sm" id="addBtn">新增</button>
      </div>
    </div>
  </div>

  <div class="layui-card-body">
    <table id="dictTable" lay-filter="dictTable"></table>
    <script type="text/html" id="dictToolBar">
      <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="edit">编辑</a>
      <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
    </script>
  </div>
</div>
<script type="text/javascript" th:inline="javascript">
  var contextPath = [[${#httpServletRequest.getContextPath()}]];
</script>
<script type="text/javascript" th:src="@{/js/dictionary/dict.js}"></script>
</body>
</html>
